﻿using System.Web.Mvc;

namespace MvcForum.Net.Controllers
{
    public class AjaxController : Controller
    {
        //
        // GET: /Ajax/

        public ActionResult Index()
        {
            return AjaxView();
        }


        public ActionResult AjaxView(string view = null, object model = null)
        {

            return PartialView(view, model);

            
            //if (RouteData != null && String.IsNullOrEmpty(viewName))
            //    viewName = RouteData.Values["action"].ToString();
            //if (Request != null && Request.IsAjaxRequest())
            //    return PartialView(viewName, model);
            //return View(viewName, null, model);

        }


    }
}
